﻿using ProjectFootball.MVC.Foundation.ResourceLibrary;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ProjectFootball.MVC.Models.EntityFramework.Entities
{
    public class LookupCompetition : ICodePickerData
    {
        #region Columns
        [Key]
        public Guid LookupCompetitionGuid { get; set; }

        public ImportSite ImportSite { get; set; }

        [ForeignKey("Competition")]
        public Guid CompetitionGuid { get; set; }

        public string SiteCompetitionId { get; set; }
        #endregion

        #region Navigation properties
        [ForeignKey("CompetitionGuid")]
        public virtual Competition Competition { get; set; }
        #endregion

        #region ICodePickerData implementation
        public Guid Code
        {
            get { return CompetitionGuid; }
        }

        public string Description
        {
            get { return Competition.CompetitionName; }
        }
        #endregion
    }
}